<template>
  <el-form label-width="150px" :model="form">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="场馆公告" prop="notice"><el-input v-model="form.notice" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" /></el-form-item>
        <el-form-item label="培训" prop="trainFlag">
          <el-radio-group v-model="form.trainFlag">
            <el-radio label="0">没有培训服务</el-radio>
            <el-radio label="1">有培训服务</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="淋浴" prop="showerFlag">
          <el-radio-group v-model="form.showerFlag">
            <el-radio label="0">没有淋浴设施</el-radio>
            <el-radio label="1">有淋浴设施</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="WIFI" prop="wifiFlag">
          <el-radio-group v-model="form.wifiFlag">
            <el-radio label="0">没有</el-radio>
            <el-radio label="1">有</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="超市" prop="marketFlag">
          <el-radio-group v-model="form.marketFlag">
            <el-radio label="0">没有</el-radio>
            <el-radio label="1">有</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="散客服务" prop="individualTouristFlag">
          <el-radio-group v-model="form.individualTouristFlag">
            <el-radio label="0">不支持</el-radio>
            <el-radio label="1">支持</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="会员卡" prop="memberCardFlag">
          <el-radio-group v-model="form.memberCardFlag">
            <el-radio label="0">不可办理</el-radio>
            <el-radio label="1">可办理</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="发票" prop="invoiceFlag">
          <el-radio-group v-model="form.invoiceFlag">
            <el-radio label="0">不提供发票</el-radio>
            <el-radio label="1">提供发票</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="停车" prop="parkFlag">
          <el-radio-group v-model="form.parkFlag">
            <el-radio label="0">收费停车</el-radio>
            <el-radio label="1">免费停车</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item><el-button type="primary" @click="submitForm">保存</el-button></el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script setup>
import { computed } from 'vue'
import { getCurrentInstance } from '@vue/runtime-core'
import { venueFacilityEdit } from '@/api/ven/index'
import useVenStore from '../../../../../store/modules/ven'


const { proxy } = getCurrentInstance()
const venStore = useVenStore()

const form = computed(() => venStore.venueInfo)

function submitForm() {
  venueFacilityEdit(form.value).then(() => {
    proxy.$modal.msgSuccess('修改成功')
  })
}
</script>

<style scoped>
.w50 {
	width: 50%;
}
.ml20 {
	margin-left: 20px;
}
</style>
